#include<stdio.h>
#include<math.h>

int main()
{
	int sign=0,n,h,w;
	float k,cha,bz;
	scanf("%d",&n);
	for(;sign<n;sign++)
	{
		scanf("%d %d",&h,&w);
		k=w/2.0;
		bz=(h-100)*0.9;
		cha=k-bz;
		if(cha<bz*0.1&&cha>-bz*0.1) printf("You are wan mei!\n");
		else if(cha<=-bz*0.1) printf("You are tai shou le!\n");
		else if(cha>=bz*0.1) printf("You are tai pang le!\n");
	}
	return 0;
}
